package com.sunwayhorizo.health.ets.base.persistent;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;


@Entity
@Table(name = "ET_MODELS", schema = "ETS")
public class EtModels implements java.io.Serializable {

	// Fields
	private static final long serialVersionUID = 1L;
	private String modelName;
	private String modelDesc;
	private String serverCodeBase;
	private String clientCodeBase;
	private String loaderCodeBase;
	private String importerCodeBase;
	private String cacheCodeBase;
	private Long createdBy;
	private Timestamp creationDate;
	private Long lastUpdatedBy;
	private Timestamp lastUpdateDate;
	private Long lastUpdateLogin;
	private List<EtCodingSchemes> children=new ArrayList<EtCodingSchemes>();

	// Constructors

	@OneToMany(mappedBy = "etModels",fetch=FetchType.LAZY)
	public List<EtCodingSchemes> getChildren() {
		return children;
	}

	public void setChildren(List<EtCodingSchemes> children) {
		this.children = children;
	}

	/** default constructor */
	public EtModels() {
	}

	/** minimal constructor */
	public EtModels(String modelName, String serverCodeBase,
			String clientCodeBase, String loaderCodeBase,
			String importerCodeBase, Long createdBy, Timestamp creationDate,
			Long lastUpdatedBy, Timestamp lastUpdateDate) {
		this.modelName = modelName;
		this.serverCodeBase = serverCodeBase;
		this.clientCodeBase = clientCodeBase;
		this.loaderCodeBase = loaderCodeBase;
		this.importerCodeBase = importerCodeBase;
		this.createdBy = createdBy;
		this.creationDate = creationDate;
		this.lastUpdatedBy = lastUpdatedBy;
		this.lastUpdateDate = lastUpdateDate;
	}

	/** full constructor */
	public EtModels(String modelName, String modelDesc, String serverCodeBase,
			String clientCodeBase, String loaderCodeBase,
			String importerCodeBase, String cacheCodeBase, Long createdBy,
			Timestamp creationDate, Long lastUpdatedBy,
			Timestamp lastUpdateDate, Long lastUpdateLogin) {
		this.modelName = modelName;
		this.modelDesc = modelDesc;
		this.serverCodeBase = serverCodeBase;
		this.clientCodeBase = clientCodeBase;
		this.loaderCodeBase = loaderCodeBase;
		this.importerCodeBase = importerCodeBase;
		this.cacheCodeBase = cacheCodeBase;
		this.createdBy = createdBy;
		this.creationDate = creationDate;
		this.lastUpdatedBy = lastUpdatedBy;
		this.lastUpdateDate = lastUpdateDate;
		this.lastUpdateLogin = lastUpdateLogin;
	}

	// Property accessors
	@Id
	@Column(name = "MODEL_NAME", unique = true, nullable = false, length = 50)
	public String getModelName() {
		return this.modelName;
	}

	public void setModelName(String modelName) {
		this.modelName = modelName;
	}

	@Column(name = "MODEL_DESC", length = 240)
	public String getModelDesc() {
		return this.modelDesc;
	}

	public void setModelDesc(String modelDesc) {
		this.modelDesc = modelDesc;
	}

	@Column(name = "SERVER_CODE_BASE", nullable = false, length = 1000)
	public String getServerCodeBase() {
		return this.serverCodeBase;
	}

	public void setServerCodeBase(String serverCodeBase) {
		this.serverCodeBase = serverCodeBase;
	}

	@Column(name = "CLIENT_CODE_BASE", nullable = false, length = 1000)
	public String getClientCodeBase() {
		return this.clientCodeBase;
	}

	public void setClientCodeBase(String clientCodeBase) {
		this.clientCodeBase = clientCodeBase;
	}

	@Column(name = "LOADER_CODE_BASE", nullable = false, length = 1000)
	public String getLoaderCodeBase() {
		return this.loaderCodeBase;
	}

	public void setLoaderCodeBase(String loaderCodeBase) {
		this.loaderCodeBase = loaderCodeBase;
	}

	@Column(name = "IMPORTER_CODE_BASE", nullable = false, length = 1000)
	public String getImporterCodeBase() {
		return this.importerCodeBase;
	}

	public void setImporterCodeBase(String importerCodeBase) {
		this.importerCodeBase = importerCodeBase;
	}

	@Column(name = "CACHE_CODE_BASE", length = 1000)
	public String getCacheCodeBase() {
		return this.cacheCodeBase;
	}

	public void setCacheCodeBase(String cacheCodeBase) {
		this.cacheCodeBase = cacheCodeBase;
	}

	@Column(name = "CREATED_BY", nullable = false, precision = 15, scale = 0)
	public Long getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(Long createdBy) {
		this.createdBy = createdBy;
	}

	@Column(name = "CREATION_DATE", nullable = false, length = 7)
	public Timestamp getCreationDate() {
		return this.creationDate;
	}

	public void setCreationDate(Timestamp creationDate) {
		this.creationDate = creationDate;
	}

	@Column(name = "LAST_UPDATED_BY", nullable = false, precision = 15, scale = 0)
	public Long getLastUpdatedBy() {
		return this.lastUpdatedBy;
	}

	public void setLastUpdatedBy(Long lastUpdatedBy) {
		this.lastUpdatedBy = lastUpdatedBy;
	}

	@Column(name = "LAST_UPDATE_DATE", nullable = false, length = 7)
	public Timestamp getLastUpdateDate() {
		return this.lastUpdateDate;
	}

	public void setLastUpdateDate(Timestamp lastUpdateDate) {
		this.lastUpdateDate = lastUpdateDate;
	}

	@Column(name = "LAST_UPDATE_LOGIN", precision = 15, scale = 0)
	public Long getLastUpdateLogin() {
		return this.lastUpdateLogin;
	}

	public void setLastUpdateLogin(Long lastUpdateLogin) {
		this.lastUpdateLogin = lastUpdateLogin;
	}

}